/**
 * 3
 *  
 * @Author : Ruoyu Wang
 * @DateTime : 24-9-22 下午6:59
 */

#include <iostream>

using namespace std;

int main() {
    int n;
    string s;
    cin >> n >> s;
    int res = 0;
    for (int i = 1; i < s.size(); ++i) {
        if (s[i] == s[i - 1]) {
            res++;
            i++;
        }
    }
    cout << res;
    return 0;
}